package com.ruoyi.field.domain;


import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 场地对象 field
 *
 * @author 李演
 * @date 2024-11-23
 */
public class Field extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 场地名称 */
    @Excel(name = "场地名称")
    private String name;

    /** 场地类型 */
    private Type type;
    /** 场地图片 */
    private String images;

    /** 场地状态【0空闲，，2使用中】 */
    private Integer status;

    /** 场地描述 */
    @Excel(name = "场地描述")
    private String describe;

    /** 最大使用人数 */
    @Excel(name = "最大使用人数")
    private Long count;

    /** Excel场地状态 */
    @Excel(name = "场地状态")
    private String excelStatus;

    /** Excel场地类型 */
    @Excel(name = "场地类型")
    private String excelType;


    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
        this.excelType = this.type.getTypeName();
    }

    public void setImages(String images)
    {
        this.images = images;
    }

    public String getImages()
    {
        return images;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
        if (this.status==0){
            this.excelStatus = "空闲";
        }else if (this.status==2){
            this.excelStatus = "使用中";
        }
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setDescribe(String describe)
    {
        this.describe = describe;
    }

    public String getDescribe()
    {
        return describe;
    }
    public void setCount(Long count)
    {
        this.count = count;
    }

    public Long getCount()
    {
        return count;
    }

    @Override
    public String toString() {
        return "Field{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type=" + type +
                ", images='" + images + '\'' +
                ", status=" + status +
                ", describe='" + describe + '\'' +
                ", count=" + count +
                '}';
    }
}
